<template>
    <div>
        <el-card class="box-card m_t_15" shadow="hover">
            <header class="header">
                <el-avatar shape="square" class="avatar" :src="data.avatar" />
                <div class="course-info">
                    <p class="title" v-text="data.name"></p>
                    <p class="title" style="font-size: 16px;padding-top: 50px">擅长领域</p>
                    <p class="p_top" v-for="item in data.field">{{item}}</p>
                </div>
            </header>
        </el-card>
        <el-card class="box-card m_t_15" shadow="hover">
            <div slot="header" class="title">个人介绍</div>
            <div class="info">
                <div class="info-item">
                    <p class="p_top">【认证资质】</p>
                    <p class="p_top p-item" v-for="item in data.introduction">{{item}}</p>
                </div>
                <div class="info-item">
                    <p class="p_top">【任职背景】</p>
                    <p class="p_top p-item" v-for="item in data.backdrop">{{item}}</p>
                </div>
            </div>
        </el-card>
    </div>
</template>

<script>
export default {
    data() {
        return {
            page: { page: 1, size: 10, total: 4 },
            data: {
                id: '3',
                name: '孙丽',
                field: ['恋爱婚姻：感情淡漠、夫妻矛盾、性格不合', '亲子教育：性格引导、情绪疏导、学习困难'],
                introduction: ['二级心理咨询师', '高级育婴师教师资格'],
                backdrop: ['中国心理卫生协会会员', '高级育婴师', '婚姻家庭咨询师'],
                avatar: 'https://img.ydlcdn.com/file/2019/08/51deed777973457fbc32fc7a2737b30c.jpg!s800x800'
            }
        };
    },
    created() {},
    mounted() {
        console.log(this.page);
    },
    methods: {
        sizeChange() {},
        pageChange() {}
    }
};
</script>

<style lang="less" scoped>
.avatar {
    width: 200px;
    height: 200px;
    img {
        width: 100%;
    }
}

.header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;

    .course-info {
        margin-left: 34px;
        margin-top: 0.57vw;
        display: flex;
        flex-direction: column;

        .p_top {
            margin-top: 0.45vw;
        }
    }
}

.info {
    padding-top: 20px;
    .info-item {
        padding: 10px 0;
    }

    .p-item {
        padding-left: 10px;
    }
}
</style>